package com.threeti.mecool.core.domain.model.basicdata;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Transient;

/**
 * 品牌(一般即指商品的品牌)
 * 
 * @author Jay Meng
 */
@Embeddable
public class Brand implements Serializable,ProjectProductData {
  @Column(name="BRAND_CODE")
  private String code;

  @Transient
  private String name;
  
  @Column(name="BRAND_CATEGORY_CODE")
  private String categoryCode;//暂无需去扁平

  @Transient
  private Customer customer;

  public Brand(String code) {
    super();
    this.code = code;
  }

  public Brand(String code, String categoryCode) {
    this(code);
    this.categoryCode = categoryCode;
  }

  public Brand(String code, String name, String categoryCode) {
    this(code, categoryCode);
    this.name = name;
  }

  public Brand(String code, String name, String categoryCode, Customer customer) {
    this(code, name, categoryCode);
    this.customer = customer;
  }

  public String getCode() {
    return code;
  }

  public String getName() {
    return name;
  }

  public String getCategoryCode() {
    return categoryCode;
  }

  public Customer getCustomer() {
    return customer;
  }

  @Override
  public String toString() {
    return "Brand [code=" + code + ", name=" + name + ", categoryCode=" + categoryCode + ", customer=" + customer + "]";
  }

  Brand() {
    super();
  }
  
}
